Intensity and rain data is handled here.
Rain is cut to the narrow area surrounding the wetlands as plotted in the time series.
## although coordinates are longitude/latitude, st_intersects assumes that they are planar
Set polygonID. Data is clipped accordingly
all <- loadPolygon(study_area[1,])
# don't know why but can only give vector here
# all_bigger <- loadPolygon(study_area[2,])
# lose the extra dimension
# all_bigger <- all_bigger[,,,1]
end <- length(water_shape$type)
for (k in 1:end) {
if(water_shape[k,]$type != "mixed") {
poly <- loadPolygon(water_shape[k,])
# set VV, timestep
poly <- poly[1,,,1]
poly.df <- as.data.frame(poly)
poly.df$type <- water_shape[k,]$type
poly.df <- poly.df[complete.cases(poly.df),]
if(k == 1) {
val <- poly.df[,4:5]
}
else {
val <- rbind(val, poly.df[,4:5])
}
}
}
# boxplot
ggplot(val, aes(x=type, y=VV)) +
geom_boxplot() +
geom_hline(yintercept = -15.34187)
# thresh <- findThreshold(val)
thresh <- list("threshold" = -14.77885)
thresh
## $threshold
## [1] -14.77885
# plot overall region
image(all[1,,,1], col = c("white", "black", "green"), breaks = c(-30, thresh$threshold, -8.833493, 20))
Rain is summed up over the plotted area. Absolute values are given in mm and relative values are given in respect to the yearly sum.
plotTS(all, thresh$threshold, -8.833493, 1, 31)
## Warning: Removed 11 rows containing missing values (position_stack).